package com.panda.order.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.panda.common.annotation.Excel;
import com.panda.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 子订单明细对象 t_panda_order_line
 * 
 * @author panda
 * @date 2021-03-14
 */
public class TPandaOrderLine extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** id */
    private Long id;

    /** 订单号 */
    @Excel(name = "订单号")
    private String tid;

    /** 商品标题 */
    @Excel(name = "商品标题")
    private String title;

    /** 交易类型 */
    @Excel(name = "交易类型")
    private String type;

    /** 商品图片的绝对路径 */
    @Excel(name = "商品图片的绝对路径")
    private String picPath;

    /** 买家昵称 */
    @Excel(name = "买家昵称")
    private String buyerNick;

    /** 退款状态。退款状态。可选值 WAIT_SELLER_AGREE(买家已经申请退款，等待卖家同意) WAIT_BUYER_RETURN_GOODS(卖家已经同意退款，等待买家退货) WAIT_SELLER_CONFIRM_GOODS(买家已经退货，等待卖家确认收货) SELLER_REFUSE_BUYER(卖家拒绝退款) CLOSED(退款关闭) SUCCESS(退款成功) */
    @Excel(name = "退款状态。退款状态。可选值 WAIT_SELLER_AGREE(买家已经申请退款，等待卖家同意) WAIT_BUYER_RETURN_GOODS(卖家已经同意退款，等待买家退货) WAIT_SELLER_CONFIRM_GOODS(买家已经退货，等待卖家确认收货) SELLER_REFUSE_BUYER(卖家拒绝退款) CLOSED(退款关闭) SUCCESS(退款成功)")
    private String refundStatus;

    /** 买家是否已评价。可选值：true(已评价)，false(未评价) */
    @Excel(name = "买家是否已评价。可选值：true(已评价)，false(未评价)")
    private Integer buyerRate;

    /** 卖家类型，可选值为：B（商城商家），C（普通卖家） */
    @Excel(name = "卖家类型，可选值为：B", readConverterExp = "商=城商家")
    private String sellerType;

    /** 子订单预计发货时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "子订单预计发货时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date estimateConTime;

    /** 订单状态 */
    @Excel(name = "订单状态")
    private String status;

    /** 商品价格 */
    @Excel(name = "商品价格")
    private BigDecimal price;

    /** 购买数量 */
    @Excel(name = "购买数量")
    private Long num;

    /** 子订单来源,如jhs(聚划算)、taobao(淘宝)、wap(无线) */
    @Excel(name = "子订单来源,如jhs(聚划算)、taobao(淘宝)、wap(无线)")
    private String orderFrom;

    /** 	应付金额（商品价格 * 商品数量 + 手工调整金额 - 子订单级订单优惠金额） */
    @Excel(name = "	应付金额", readConverterExp = "商=品价格,*=,商=品数量,+=,手=工调整金额,-=,子=订单级订单优惠金额")
    private BigDecimal totalFee;

    /** 	服务详情的URL地址 */
    @Excel(name = "	服务详情的URL地址")
    private String serviceDetailUrl;

    /** 子订单实付金额 */
    @Excel(name = "子订单实付金额")
    private BigDecimal payment;

    /** 子订单的交易结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "子订单的交易结束时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date endTime;

    /** 子订单发货时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "子订单发货时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date consignTime;

    /** 子订单发货的快递公司名称 */
    @Excel(name = "子订单发货的快递公司名称")
    private String logisticsCompany;

    /** 子订单所在包裹的运单号 */
    @Excel(name = "子订单所在包裹的运单号")
    private String invoiceNo;

    /** 发货的仓库编码 */
    @Excel(name = "发货的仓库编码")
    private String storeCode;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setTid(String tid) 
    {
        this.tid = tid;
    }

    public String getTid() 
    {
        return tid;
    }
    public void setTitle(String title) 
    {
        this.title = title;
    }

    public String getTitle() 
    {
        return title;
    }
    public void setType(String type) 
    {
        this.type = type;
    }

    public String getType() 
    {
        return type;
    }
    public void setPicPath(String picPath) 
    {
        this.picPath = picPath;
    }

    public String getPicPath() 
    {
        return picPath;
    }
    public void setBuyerNick(String buyerNick) 
    {
        this.buyerNick = buyerNick;
    }

    public String getBuyerNick() 
    {
        return buyerNick;
    }
    public void setRefundStatus(String refundStatus) 
    {
        this.refundStatus = refundStatus;
    }

    public String getRefundStatus() 
    {
        return refundStatus;
    }
    public void setBuyerRate(Integer buyerRate) 
    {
        this.buyerRate = buyerRate;
    }

    public Integer getBuyerRate() 
    {
        return buyerRate;
    }
    public void setSellerType(String sellerType) 
    {
        this.sellerType = sellerType;
    }

    public String getSellerType() 
    {
        return sellerType;
    }
    public void setEstimateConTime(Date estimateConTime) 
    {
        this.estimateConTime = estimateConTime;
    }

    public Date getEstimateConTime() 
    {
        return estimateConTime;
    }
    public void setStatus(String status) 
    {
        this.status = status;
    }

    public String getStatus() 
    {
        return status;
    }
    public void setPrice(BigDecimal price) 
    {
        this.price = price;
    }

    public BigDecimal getPrice() 
    {
        return price;
    }
    public void setNum(Long num) 
    {
        this.num = num;
    }

    public Long getNum() 
    {
        return num;
    }
    public void setOrderFrom(String orderFrom) 
    {
        this.orderFrom = orderFrom;
    }

    public String getOrderFrom() 
    {
        return orderFrom;
    }
    public void setTotalFee(BigDecimal totalFee) 
    {
        this.totalFee = totalFee;
    }

    public BigDecimal getTotalFee() 
    {
        return totalFee;
    }
    public void setServiceDetailUrl(String serviceDetailUrl) 
    {
        this.serviceDetailUrl = serviceDetailUrl;
    }

    public String getServiceDetailUrl() 
    {
        return serviceDetailUrl;
    }
    public void setPayment(BigDecimal payment) 
    {
        this.payment = payment;
    }

    public BigDecimal getPayment() 
    {
        return payment;
    }
    public void setEndTime(Date endTime) 
    {
        this.endTime = endTime;
    }

    public Date getEndTime() 
    {
        return endTime;
    }
    public void setConsignTime(Date consignTime) 
    {
        this.consignTime = consignTime;
    }

    public Date getConsignTime() 
    {
        return consignTime;
    }
    public void setLogisticsCompany(String logisticsCompany) 
    {
        this.logisticsCompany = logisticsCompany;
    }

    public String getLogisticsCompany() 
    {
        return logisticsCompany;
    }
    public void setInvoiceNo(String invoiceNo) 
    {
        this.invoiceNo = invoiceNo;
    }

    public String getInvoiceNo() 
    {
        return invoiceNo;
    }
    public void setStoreCode(String storeCode) 
    {
        this.storeCode = storeCode;
    }

    public String getStoreCode() 
    {
        return storeCode;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("tid", getTid())
            .append("title", getTitle())
            .append("type", getType())
            .append("picPath", getPicPath())
            .append("buyerNick", getBuyerNick())
            .append("refundStatus", getRefundStatus())
            .append("buyerRate", getBuyerRate())
            .append("sellerType", getSellerType())
            .append("estimateConTime", getEstimateConTime())
            .append("status", getStatus())
            .append("price", getPrice())
            .append("num", getNum())
            .append("orderFrom", getOrderFrom())
            .append("totalFee", getTotalFee())
            .append("serviceDetailUrl", getServiceDetailUrl())
            .append("payment", getPayment())
            .append("endTime", getEndTime())
            .append("consignTime", getConsignTime())
            .append("logisticsCompany", getLogisticsCompany())
            .append("invoiceNo", getInvoiceNo())
            .append("storeCode", getStoreCode())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
}
